﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SafeHomeSystem
{
    public partial class Monitor_Camera : Form
    {
        public Monitor_Camera()
        {
            InitializeComponent();
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void label3_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            monitor_show monitorshow = new monitor_show();
            if (null == this.listBox.SelectedItem)
            {
                MessageBox.Show("您还没有选择要查看的房间！", "警告！");
            }
            else
            {
                if (this.listBox.SelectedItem.ToString() == "1.主卧")
                {
                    monitorshow.GetLabel.Text = "1.主卧：";
                    monitorshow.GetLabel.Visible = true;
                    monitorshow.Getpicturebox.Image = SafeHomeSystem.Properties.Resources.woshi2;
                    monitorshow.Show();
                }
                else if (this.listBox.SelectedItem.ToString() == "2.卧室")
                {
                    monitorshow.GetLabel.Text = "2.卧室：";
                    monitorshow.GetLabel.Visible = true;
                    monitorshow.Getpicturebox.Image = SafeHomeSystem.Properties.Resources.woshi1;
                    monitorshow.Show();
                }
                else if (this.listBox.SelectedItem.ToString() == "3.客厅")
                {
                    monitorshow.GetLabel.Text = "3.客厅：";
                    monitorshow.GetLabel.Visible = true;
                    monitorshow.Getpicturebox.Image = SafeHomeSystem.Properties.Resources.keting;
                    monitorshow.Show();
                }
                else if (this.listBox.SelectedItem.ToString() == "4.厨房")
                {
                    monitorshow.GetLabel.Text = "4.厨房：";
                    monitorshow.GetLabel.Visible = true;
                    monitorshow.Getpicturebox.Image = SafeHomeSystem.Properties.Resources.chufang;
                    monitorshow.Show();
                }
                else if (this.listBox.SelectedItem.ToString() == "5.门口")
                {
                    monitorshow.GetLabel.Text = "5.门口：";
                    monitorshow.GetLabel.Visible = true;
                    monitorshow.Getpicturebox.Image = SafeHomeSystem.Properties.Resources.men;
                    monitorshow.Show();
                }
            }

        }
    }
}
